package st.mark.quadtris;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import st.mark.quadtris.states.GamePlay;
import st.mark.quadtris.states.HighScores;
import st.mark.quadtris.states.Loading;
import st.mark.quadtris.states.Menu;

public class Quadtris extends StateBasedGame {

	public static final int LOADING_STATE = 0;
	public static final int MENU_STATE = 1;
	public static final int GAMEPLAY_STATE = 2;
	public static final int HIGHSCORES_STATE = 3;
	
	public Quadtris() {
		super("Quadtris by Mar3k");
		
		// Register game states
		this.addState(new Loading(LOADING_STATE));
		this.addState(new Menu(MENU_STATE));
		this.addState(new GamePlay(GAMEPLAY_STATE));
		this.addState(new HighScores(HIGHSCORES_STATE));
	}

	public void initStatesList(GameContainer gc) throws SlickException {
	}

	public static void main(String[] args) throws SlickException {
		AppGameContainer quadtris = new AppGameContainer(new Quadtris());
		quadtris.setDisplayMode(800, 600, false);
		quadtris.setAlwaysRender(true);
		quadtris.setMusicVolume(0.5f);
		quadtris.setSoundVolume(1.0f);
		quadtris.setShowFPS(false);
		quadtris.setVerbose(false);
		quadtris.start();
	}

}
